package cn.itcast.javabase;

/**
 * @title: Circle
 * @Author Zhou
 * @Date: 2022/1/18 15:30
 * @Version 1.0
 */
public class Circle {
    public static void main(String[] args) {
        A05 a05 = new A05(3);
        double area = a05.area();
        System.out.println("area = " + area);
        System.out.println(a05.len());
    }
}

class A05 {
    double radius;

    public A05(double radius) {
        this.radius = radius;
    }

    public double area() {
        return Math.PI * radius * radius;
    }

    public double len() {
        return 2 * Math.PI * radius;
    }
}
